<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>系统用户管理</title>
	<link href="/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="place">
    	<span>位置：</span>
	    <ul class="placeul"><li><a href="/index.html">首页</a></li><li>系统用户管理</li></ul>
    </div>
    
    <div class="rightinfo">
	    <div class="tools">
	    	<ul class="toolbar">
		        <li class="click"><a href="/sms/template/add.html"><span><img src="/images/t01.png" /></span>添加</a></li>
		        <li id="delBatch"><span><img src="/images/t03.png" /></span>批量删除</li>
	        </ul>
	        <ul class="toolbar1">
	        	<form action="/sms/template/templates.html" method="post">
		        	<span>
		        		
				    	<select class="select3" name="categoryId" style="width: 100px;">
						    <option value="">选择模板分类</option>
						    <#if categories??><#list categories as item>
						    <option value=${item.id} <#if (template.categoryId)!0 ==item.id>selected="selected"</#if>>${(item.name)!""}</option>
					        </#list></#if>
					    </select>
		        		
				    	<select class="select3" name="platformId" style="width: 100px;">
						    <option value="">选择短信平台</option>
						    <#if platforms??><#list platforms as item>
						    <option value=${item.id} <#if (template.platformId)!0 ==item.id>selected="selected"</#if>>${(item.name)!""}</option>
					        </#list></#if>
					    </select>
		        		<input name="code" class="scinput" type="text" value="${(template.code)!""}" autocomplete="off" placeholder="模板编号">
		        		<input name="name" class="scinput" type="text" value="${(template.name)!""}" autocomplete="off" placeholder="模板名称">
				    	<input type="submit" class="scbtn" value="查询"/>
		        	</span>
	    		</form>
	        </ul>
	    </div>
        
    	<table class="tablelist">
	    	<thead>
		    	<tr>
			        <th width="7%">ID</th>
			        <th width="10%">模板名称</th>
			        <th width="10%">模板类型</th>
			        <th width="10%">模板编号</th>
			        <th width="18%">模板内容</th>
			        <th width="10%">模板备注</th>
			        <th width="10%">所属平台</th>
			        <th width="10%">创建时间</th>
			        <th width="15%">操作</th>
		        </tr>
	        </thead>
	        <tbody>
	        <#if templates??>
			  		<#list templates as item>
						<tr>
					        <td>${(item.id)!""}</td>
					        <td>${(item.name)!""}</td>
					        <td>${(item.categoryName)!""}</td>
					        <td>${(item.code)!""}</td>
					        <td>${(item.content)!""}</td>
					        <td>${(item.description)!""}</td>
					        <td>${(item.platformName)!""}</td>
					        <td><#if item.createTime?exists>${(item.createTime)?string("yyyy-MM-dd HH:mm:ss")}<#else>--</#if></td>
					        <td>
					        	<a href="/sms/template/view/${item.id}.html">查看</a>&ensp;|&ensp;
					        	<a href="/sms/template/edit/${item.id}.html">编辑</a>&ensp;|&ensp;
					        	<a href="javascript:void(0);" name="delBtn" dataId=${(item.id)!0}>删除</a>
					        </td>
				        </tr> 
			  		</#list>
			  	</#if>
	        </tbody>
	    </table>
   		<#import "/common/pager.ftl" as page>
		<#if count??>
			<@page.pager start=start size=size count=count url="/sms/template/templates.html?t=admin" gotoPage=true />
		</#if>
	</body>
	<script type="text/javascript" src="/js/jquery-1.10.1.min.js"></script>
	<script type="text/javascript" src="/js/commonList.js"></script>
	<script type="text/javascript">
		/** 删除的URL地址前缀，在commonList.js里面调用的删除方法会用到 */
		var delUrl = "/sms/template";
	</script>
</html>